package com.hanxiaozhang.flyweight.no1;

/**
 * 〈一句话功能简述〉<br>
 * 〈具体享元类：圆〉
 *
 * @author hanxinghua
 * @create 2025/4/17
 * @since 1.0.0
 */
public class Circle implements Shape {
    private String color;
    private int x;
    private int y;
    private int radius;

    public Circle(String color) {
        this.color = color;
        x = 0;
        y = 0;
        radius = 0;
    }

    public void setX(int x) {
        this.x = x;
    }

    public void setY(int y) {
        this.y = y;
    }

    public void setRadius(int radius) {
        this.radius = radius;
    }

    @Override
    public void draw(String color, String filled) {
        System.out.println("Circle: Draw() [Color : " + color + ", x : " + x + ", y :" + y + ", radius :" + radius + "]");
    }
}
